<style type="text/css">
    .bjui-pageHeader{
        font-size: 18px;
        font-weight: bold;
    }
    .form{
        padding: 15px;
    }
    .form dl {
        overflow: hidden;
        padding-top: 15px;
    }
    tr{
        line-height: 23px;
    }
    .form dt {
        color: #666;
        float: left;
        font-size: 14px;
        padding: 3px 0 0;
        width: 11%;
    }
    .form dd {
        float: left;
        line-height: 22px;
    }
    dd.desc {
        height: 30px;
        padding: 0 10px;
        width: 150px;
    }
    .main{
            width: 480px;
            height: 300px;
            padding-top: 30px;
            padding-left:30px;
            display: block;
        }
    .left{
            float: left;
        }
        .right{
            float: right;
        }
</style>
<script type="text/javascript">
        $('#file_upload').uploadify({
                    'fileSizeLimit': '5000KB',
                    'buttonText': '点击上传头像',
                    'buttonClass': 'uploadify',
                    'swf': '__PUBLIC__/UI/plugins/uploadify/scripts/uploadify.swf',
                    'uploader': '{:U('Attachment/uploads',array('dir'=>'image'))}',
                    'width': '120',
                    'fileTypeDesc': 'Image Files',
                    'fileTypeExts': '*.gif; *.jpg; *.bmp; *.jpeg; *.png',
                    'multi': false,
                    'formData': {'session_id': '<?php echo session_id();?>'},
                    'onUploadSuccess': function(file, data, response) {
                        var msg = $.parseJSON(data);
                        $('#txtimage').attr("src", msg.url);
                        $("#face").val(msg.url);
                        $(".upload_preview").show();
                    }
        });
</script>
<div class="bjui-pageContent">
    <form action="{:U('Member/editHandle')}" method="post" data-toggle="validate">
<div class="main">
    <div class="left">

        <table>
            <tr>
                <td class="title">登录mail：</td>
                <td><input type="text" name="email" id="email" class="inp" value="{$user.email}" readonly="readonly"><font color="red">*</font></td>
            </tr>
            <tr>
                <td class="title">所属分组：</td>
                <td><select name="membergroup" id="membergroup">
                    <foreach name="membergroup" item="g">
                        <option value="{$g.id}" <if condition="$g['id'] eq $user['groupid']">selected=selected</if>>{$g.name}</option>
                    </foreach>
                </select>
                </td>
            </tr>
            <tr>
                <td class="title">登录密码：</td>
                <td><input type="password" name="pwd" id="pwd" class="inp" value="{$user.password}" title="保持为空即为不修改！"></td>
            </tr>
            <tr>
                <td class="title">昵  称：</td>
                <td><input type="text" name="nickname" id="nickname" class="inp" value="{$user.nickname}" data-rule="昵称:required;length[4~]" data-ok="OK"></td>
            </tr>
            <tr>
                <td class="title">性  别：</td>
                <td><input type="radio" name="sex" value="0" id="sex" <if condition="$user['sex'] eq 0">checked="checked"</if>>男士 <input type="radio" name="sex" value="1" id="sex" <if condition="$user['sex'] eq 1">checked="checked"</if>>女士</td>
            </tr>
            <tr>
                <td class="title">余  额：</td>
                <td><input type="text" name="amount" id="amount" class="inp" value="{$user.amount}"></td>
            </tr>
            <tr>
                <td class="title">积  分：</td>
                <td><input type="text" name="score" id="score" class="inp" value="{$user.score}"></td>
            </tr>

            <tr>
                <td class="title">真实姓名：</td>
                <td><input type="text" name="realname" id="realname" class="inp" value="{$user.realname}"></td>
            </tr>
            <tr>
                <td class="title">qq：</td>
                <td><input type="text" name="qq" id="qq" class="inp" value="{$user.qq}"></td>
            </tr>
            <tr>
                <td class="title">电话：</td>
                <td><input type="text" name="phone" id="phone" class="inp" value="{$user.phone}"></td>
            </tr>
            <tr>
                <td class="title">激  活：</td>
                <td><input type="radio" name="status" value="1" id="status" <if condition="$user['status'] eq 1">checked="checked"</if>>是 <input type="radio" name="status" value="0" id="status" <if condition="$user['status'] eq 0">checked="checked"</if>>否</td>
            </tr>
            <tr>
                <td class="title">锁  定：</td>
                <td><input type="radio" name="islock" value="1" id="islock" <if condition="$user['islock'] eq 1">checked="checked"</if>>是 <input type="radio" name="islock" value="0" id="islock" <if condition="$user['islock'] eq 0">checked="checked"</if>>否</td>
            </tr>
            <tr>
                    <input type="hidden" name="id" id="id" value="{$user.id}">
            </tr>
        </table>
    </div>
    <div class="right">
        <table>
            <tr>
                <td><img src="{$user.face|default_pic}" width="100px" height="100px" id="txtimage"></td>
            </tr>
            <tr>
                <td>
                <input type="text" name="" id="file_upload" data-icon="cloud-upload">
                <input type="hidden" name="face" id="face" value="{$user.face}" data-rule="头像:required" data-ok="OK" data-tip="请填上传头像"></td>
            </tr>
        </table>
    </div>
</div>
</form>
</div>
<div class="bjui-pageFooter">
    <ul>
        <li><button type="button" class="btn-close" data-icon="close">关闭</button></li>
                            <li>
        <button data-icon="save" class="btn btn-default" type="submit">保存</button>
    </li>
    </ul>
</div>